type typeUser = {
  name: string
  age: number
}

const Henry = {
  name: 'Henry',
  age: 18,
  gender: 'female' // as 不会不报错
} as typeUser

const Bob = {
  name: 'Bob',
  age: 18
  // gender: 'male' //报错：对象字面量只能指定已知属性，并且“gender”不在类型“typeUser”中
} satisfies typeUser
